home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectShow / Capture / PlayCapMoniker / PlayCapMoniker.h < prev    next >
Encoding:
Text File  |  2001-10-08  |  1.5 KB  |  53 lines

  1. //------------------------------------------------------------------------------
  2. // File: PlayCapMoniker.h
  3. //
  4. // Desc: DirectShow sample code - header file for PlayCapMoniker
  5. //       previewer application.
  6. //
  7. // Copyright (c) 2000-2001 Microsoft Corporation.  All rights reserved.
  8. //------------------------------------------------------------------------------
  9.  
  10.  
  11. //
  12. // Function prototypes
  13. //
  14. int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hInstP, LPSTR lpCmdLine, int nCmdShow);
  15. LRESULT CALLBACK WndMainProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  16.  
  17. HRESULT GetInterfaces(void);
  18. HRESULT CaptureVideoByMoniker();
  19. HRESULT FindCaptureDeviceMoniker(IMoniker **pMoniker);
  20. HRESULT HandleGraphEvent(void);
  21.  
  22. void Msg(TCHAR *szFormat, ...);
  23. void CloseInterfaces(void);
  24.  
  25. // Remote graph viewing functions
  26. HRESULT AddGraphToRot(IUnknown *pUnkGraph, DWORD *pdwRegister);
  27. void RemoveGraphFromRot(DWORD pdwRegister);
  28.  
  29. //
  30. // Macros
  31. //
  32. #define SAFE_RELEASE(x) { if (x) x->Release(); x = NULL; }
  33.  
  34. #define JIF(x) if (FAILED(hr=(x))) \
  35.     {Msg(TEXT("FAILED(hr=0x%x) in ") TEXT(#x) TEXT("\n"), hr); return hr;}
  36.  
  37. //
  38. // Constants
  39. //
  40. #define DEFAULT_VIDEO_WIDTH     320
  41. #define DEFAULT_VIDEO_HEIGHT    320
  42.  
  43. #define APPLICATIONNAME TEXT("Video Capture Previewer")
  44. #define CLASSNAME       TEXT("VidCapPreviewerByMoniker")
  45.  
  46. // Application-defined message to notify app of filtergraph events
  47. #define WM_GRAPHNOTIFY  WM_APP+1
  48.  
  49. //
  50. // Resource constants
  51. //
  52. #define IDI_VIDPREVIEW          100
  53.